/* let num = 1;
let copyNum = num
num = 2
console.log(num, copyNum); */
/* let str = 'java';
let copyStr = str;
str = 'python'
console.log(str, copyStr); */

/* let arr = [1, 2, 3, 4]
let copyArr = arr
arr[2] = 'a'
console.log(arr, copyArr); */
/* let obj = {
    a: 1,
    b: 2,
    c: 'c'
}
let copyObj = obj
obj.c = 123
console.log(obj, copyObj); */
/* let list = [1, 2, 3, 4];
let copyList = list.slice();
list[1] = 'a'
console.log(list, copyList); */
let obj = {
    a: 1,
    b: 2,
    c: 3
}
let copyObj = Object.assign({}, obj)
obj.c = 'cc'
console.log(obj, copyObj);